package com.server.questionbank.snframe.mapper.QuestionBank;

import com.server.questionbank.snframe.domain.Course.TCourse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CoursesMapper {
    /**
     * 查询有关courseId、courseName的集合
     * @return
     */
    @Select("SELECT course_id , course_name FROM T_course")
    public List<TCourse> getCourse();

    @Select("SELECT * FROM T_course WHERE course_id = #{courseId}")
    public List<TCourse> searchByCourseIdParams(@Param("courseId") Long courseId);

}
